home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
Tools
/
SFX-Player
/
Mpeg
/
MrMPEG
/
Libs
/
rexxutil.doc
next >
Wrap
Text File
|
2000-05-08
|
5KB
|
206 lines
rexxutil.library
BETA version 33.159, 14-Sept-90
Written by David N. Junod
SCOPE
This library's goal in life is to add standard data sharing techniques to
ARexx. It achieves this by providing clipboard access, environment
variables, and temporary files.
This library honors both simple and complex variables.
This library requires the presence of iffparse.library, and will operate
under version 1.3 or 2.0 of the Amiga operating system.
FUNCTION SYNOPSIS
Clipboard Access
The rexxutil.library provides the following functions for clipboard access.
WriteClip Write information into the desired clipboard unit.
ReadClip Read the desired clipboard unit into a variable.
QueryClip Determine the status of any particular clipboard unit.
Environment Variables
The library provides the following environment variable functions. Note
that under AmigaOS 2.0 the library honors local, as well as global,
variables.
GetVar Get the value of an environment variable.
SetVar Set the value of an environment variable.
DeleteVar Delete an environment variable.
Temporary Files
The library provides the following functions for temporary data.
TmpFile Provide a temporary file name, guaranteed to be unique.
FUNCTION DESCRIPTIONS
WriteClip(var,vartype,cliptype,unit,author,project)
var The name of the variable to extract the information from.
vartype STEM to indicate that var is a complex variable. Note that
when using a stem variable, that var MUST end with a period.
The stem variable must use node 0 to represent the number
of lines present. The node clipid is updated to reflect
the Clip ID assigned to the write.
clip.0 = 1
clip.1 = "Now is the time"
CALL WriteClip(clip.,STEM)
VAR to indicate that var is a simple variable. This is the
default.
clip = "Now is the time"
CALL WriteClip(clip)
cliptype Use FTXT to indicate that the contents of var are to be
written as FTXT (text). FTXT is the default.
unit A number, ranging from 0 to 255, used to indicate the
clipboard unit to write the information to. 0 is the
default.
author The base name of the application writing the clip.
project The name of the project that the information was extracted
from.
ReadClip(var,vartype,cliptype,unit,author,project)
var The name of the variable to place the information in. This
is only used when vartype is STEM.
vartype STEM to indicate that var is a complex variable. Note that
when using a stem variable, that var MUST end with a period.
CALL ReadClip(clip.,STEM)
When using a stem variable, then the following nodes are
also filled in.
clipid Clip ID assigned to the clip.
form Type of clip (FTXT for text).
auth Base name of the application that originally
wrote the clip.
name Name of the project that the clip was
extracted from.
characters Indicate the number of characters (only
valid when contents are text.
0 Indicate the number of lines. Then nodes
1 to the value of 0 contain the lines of
information in the clip.
VAR to indicate that the contents are to be returned as a
simple variable. This is the default.
clip = ReadClip()
cliptype Use FTXT to indicate that the contents of var are to be
written as FTXT (text). FTXT is the default.
unit A number, ranging from 0 to 255, used to indicate the
clipboard unit to write the information to. 0 is the
default.
author The base name of the application writing the clip.
project The name of the project that the information was extracted
from.
QueryClip(var,vartype,unit)
var The name of the variable to place the information in. This
is only used when vartype is STEM.
vartype STEM to indicate that var is a complex variable. Note that
when using a stem variable, that var MUST end with a period.
CALL QueryClip(status.,STEM)
When using a stem variable, then the following nodes are
also filled in.
clipid Clip ID assigned to the clip.
form Type of clip (FTXT for text).
VAR to indicate that the contents are to be returned as a
simple variable. This is the default.
status = QueryClip()
Where the contents of status are in the form:
clipid, form
unit A number, ranging from 0 to 255, used to indicate the
clipboard unit to write the information to. 0 is the
default.
GetVar(name,type)
name Name of the variable to get.
type GLOBAL, the default, is used to indicate a global
environment variable.
LOCAL to indicate that the variable is local.
SetVar(name,value,type)
name Name of the variable to set.
value Value to set the variable to.
type GLOBAL, the default, is used to indicate a global
environment variable.
LOCAL to indicate a local variable.
DeleteVar(name,type)
name Name of the variable to delete.
type GLOBAL, the default, is used to indicate a global
environment variable.
LOCAL to indicate a local variable.
TmpFile(basename)
basename The base name to use when deriving a unique file name.
This function will actually attempt to create what is
supposes to be a unique name, before returning the name to
the application. This guarantees that the temporary file
name is actually unique and capable of being written to.